#include "contrlDevices.h"

int diningroomLightOpen()
{
	digitalWrite(LED2_PIN,LOW);
}

int diningroomLightClose()
{
	digitalWrite(LED2_PIN,HIGH);
}

int diningroomLightInit()
{
	pinMode(LED2_PIN,OUTPUT);
	digitalWrite(LED2_PIN,HIGH);

}

contrl diningroomLight = {
	.devicesName = "diningroomLight",
	.open = diningroomLightOpen,
	.close = diningroomLightClose,
	.deviceInit = diningroomLightInit
};

contrl *addDiningroomLightToDeviceLink(contrl *phead)
{
	if(phead != NULL) diningroomLight.next = phead;
	return &diningroomLight;
}